<?php
/**
 * Project: Recipe
 * File: MenuModel.class.php
 * Author: Xnfy520@gmail.com
 * Date: 12-5-7
 * Time: 上午11:01
 */

	class MenuModel extends RelationModel{

		protected $_validate = array(
			array('name', 'require', '菜单分类名称不能为空', 1, 'regex', 3),
			array('sort', 'number', '排序必须为数字', 1, 'regex', 3),
		);

		protected $_link = array(

			'MenuItem'=>array(
				'mapping_type'=>HAS_MANY,
				'mapping_name'=>'menuitem',
				'class_name'=>'MenuItem',
				'foreign_key'=>'menuid',
			),

		);

	}